.TH std::default_accessor 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::default_accessor \- std::default_accessor

.SH Synopsis
   Defined in header <mdspan>
   template< class ElementType >  (since C++23)
   class default_accessor;

   The std::default_accessor class template is the default AccessorPolicy used by
   std::mdspan if no user-specified accessor policy is provided.

   Each specialization of default_accessor models semiregular and is TriviallyCopyable.

.SH Template parameters

                 the element type. Shall be a complete object type that is neither an
   ElementType - abstract class type nor an array type. Otherwise, the program is
                 ill-formed

.SH Member types

   Member type      Definition
   offset_policy    default_accessor
   element_type     ElementType
   reference        ElementType&
   data_handle_type ElementType*

.SH Member functions

   constructor   constructs a default_accessor
                 \fI(public member function)\fP
   access        returns a n^th element provided by arguments
                 \fI(public member function)\fP
   offset        returns a data handle that has an offset provided by arguments
                 \fI(public member function)\fP

std::default_accessor::default_accessor

   constexpr default_accessor() noexcept = default;                             \fB(1)\fP
   template< class OtherElementType >                                           \fB(2)\fP
   constexpr default_accessor( default_accessor<OtherElementType> ) noexcept {}

   1) Default constructs a default_accessor.
   2) Constructs a default_accessor from default_accessor<OtherElementType>. The
   constructor has no visible effect. This overload participates in overload resolution
   only if std::is_convertible_v<OtherElementType(*)[], element_type(*)[]> is true.

std::default_accessor::access

   constexpr reference access( data_handle_type p, std::size_t i ) const noexcept;

   Equivalent to return p[i];.

std::default_accessor::offset

   constexpr data_handle_type offset( data_handle_type p, std::size_t i ) const
   noexcept;

   Equivalent to return p + i;.

.SH Example

    This section is incomplete
    Reason: no example

.SH Category:
     * Todo no example
